package io.lkt.modules.sys.nopassword;

/**
 * @version : V1.0
 * @ClassName: NoPwdUtils
 * @Description: TODO
 * @Auther: chujiu
 * @Date: 2021/1/4 14:49
 */
public class NoPwdUtils {

    /**
     * 验证页面路径，金友助手
     */
//    public static final String WEB_PATH_MAIN= "http://zktcustom.qishangjinfu.com/pages/officialAccounts/qrCodeLog.html";
    public static final String WEB_PATH_MAIN= "http://zktcustom.qishangjinfu.com/pages/officialAccounts/qrCodeLog.html?uniqueness=UNIQUENESS&qrCodeType=QRCODETYPE&sysUser=SYSUSER&origin=ORIGIN";
    /**
     * 验证页面路径，小幸早晚安
     */
//    public static final String WEB_PATH_MAIN= "http://test.qishangjinfu.com/pages/officialAccounts/qrCodeLog.html";
//    public static final String WEB_PATH_MAIN= "http://test.qishangjinfu.com/pages/officialAccounts/qrCodeLog.html?uniqueness=UNIQUENESS&qrCodeType=QRCODETYPE&sysUser=SYSUSER&origin=ORIGIN";

    public static final String QR_CODE_TYPE_LOGIN = "login";

    public static final String QR_CODE_TYPE_BINDING = "binding";
    /**
     * 登录二维码 redis key
     */
    public static final String LOGIN_QR_CODE_KEY = "login_qr_codes:";

    /**
     * 绑定二维码 redis key
     */
    public static final String BINDING_QR_CODE_KEY = "binding_qr_codes:";

    /**
     * 登录二维码有效期（300秒）
     */
    public static final long LOGIN_QR_CODE_EXPIRATION = 300;

    /**
     * 未扫码
     */
    public static final String QR_CODE_STATUS_NOT = "0:";

    /**
     * 已扫码
     */
    public static final String QR_CODE_STATUS_HAS = "1:";

    /**
     * 已确定
     */
    public static final String QR_CODE_STATUS_OK = "2:";

    /**
     * 后台已确定，来源 1
     */
    public static final String QR_CODE_STATUS_OK_ORIGIN_ONE = "2:one:";

    /**
     * 后台已确定，来源 2
     */
    public static final String QR_CODE_STATUS_OK_ORIGIN_TWO = "2:two:";

    /**
     * LOGIN_UUID_SESSION
     */
    public static final String LOGIN_UUID_SESSION_KEY = "LOGIN_UUID_SESSION_KEY";

    /**
     * BINDING_UUID_SESSION
     */
    public static final String BINDING_UUID_SESSION_KEY = "BINDING_UUID_SESSION_KEY";

    /**
     * 简化的UUID，去掉了横线
     *
     * @return 简化的UUID，去掉了横线
     */
    public static String simpleUUID() {
        return UUID.randomUUID().toString(true);
    }

    /**
     * 免密登录万能密码
     */
    public static final String UNIVERSAL_PASSWORD = "UNIVERSAL_PASSWORD";
}
